using PyCall
using TongLun

PyCall.py"""
import tonglun_py
"""

X = transpose(rand(2, 3))
TongLun.export_fn("matrix32", () -> X)

display(TongLun.call_fn("matrix32"))

PyCall.py"""
from tonglun_py import call_fn, export_fn

x = call_fn("matrix32")

print('Shape:')
print(x.shape)

print('NumPy Array:')
print(x)

print('Flags:')
print(x.flags)
"""

PyCall.py"""
import numpy as np

x = np.random.randn(3, 2)
print(x)

export_fn("matrix32_py_fixed", lambda: x)

"""

display(TongLun.call_fn("matrix32_py_fixed"))